package com.zx.viewlearn.activity;

import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;

import com.zx.viewlearn.R;

public class ViewLearnActivity17VectorSun extends AppCompatActivity {
    ImageView my_iv;
    ImageView my_iv_2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view_learn_activity16_vector_sun);
        my_iv = findViewById(R.id.my_iv);
        my_iv_2 = findViewById(R.id.my_iv_2);
    }

    public void test(View view) {

        Drawable drawable = my_iv.getDrawable();
        if (drawable instanceof Animatable) {
            ((Animatable) drawable).start();
        }
    }

    public void test2(View view) {
        Drawable drawable = my_iv_2.getDrawable();
        if (drawable instanceof Animatable) {
            ((Animatable) drawable).start();
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}
